package top.ffhome.system.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import top.ffhome.common.service.impl.BaseServiceImpl;
import top.ffhome.system.entity.SysDoc;
import top.ffhome.system.mapper.SysDocMapper;
import top.ffhome.system.service.SysDocService;

@Service
public class SysDocServiceImpl extends BaseServiceImpl<SysDoc, SysDocMapper> implements SysDocService {
	@Override
	public SysDoc getByMd5(String md5) {
		SysDoc dto = new SysDoc();
		dto.getParams().put("md5", md5);
		dto.getParams().put("limitCount", 1);
		List<SysDoc> list = mapper.select(dto);
		if (list.size() > 0) {
			return list.get(0);
		}
		return null;
	}
}
